<template>
	<view>
		<u-modal :value="isweishenhe" :show-confirm-button="true" @confirm="confirmAudit" :confirm-color="'#FFFFFF'"
			:confirm-style="confirmStyle" :confirm-text="'我知道了'" :title="' '">
			<view class="slot-content">
				<view class="audit_img">
					<image class="audit_img_top" src="@/static/images/5c8352de0bcc21.png"></image>
				</view>
				<view class="audit_title">入驻信息审核中</view>
				<view class="audit_sub_title">请耐心等待工作人员审核</view>
			</view>
		</u-modal>
	</view>
</template>
<script>
	import store from '@/shopro/store';
	import {
		mapMutations,
		mapActions,
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				isweishenhe:false,
				confirmStyle: {
					'width': '69%',
					'margin': '40rpx auto',
					'background': '#D9D9D9 linear-gradient(90deg, #e9c83ce8 0%, #FF6E6D 100%)',
					'border-radius': '60rpx',
					'flex': 'inherit'
				},
			};
		},
		async onLoad(options) {
			// 检测H5登录回调
			if (options.token) {
				let that = this;
				uni.showLoading({
					title: '登录中...'
				});
				let userInfo =  await that.getUserInfo(options.token);
				console.log(userInfo)
				// if (!userInfo.check_state) {
				// 	this.isweishenhe = true;
				// 	return false
				// }
				let lastPage = uni.getStorageSync('lastPage');
				if (lastPage) {
					uni.removeStorageSync('lastPage');
					window.location = lastPage;
					
				} else {
					uni.switchTab({
						url: '/'
					});
				}
			}
		},
		methods: {
			...mapActions(['getUserInfo']),
			confirmAudit() {
				this.isweishenhe = false;
			},
		}
	};
</script>

<style lang="scss" scoped>
	.slot-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	
		.audit_img {
			width: 160rpx;
			height: 160rpx;
	
			.audit_img_top {
				width: 100%;
				height: 100%;
			}
		}
	
		.audit_title {
			font-size: 36rpx;
			font-weight: bold;
			color: #ffffff;
			line-height: 48rpx;
			margin: 20rpx auto 20rpx;
		}
	
		.audit_sub_title {
			font-size: 32rpx;
			font-weight: 500;
			color: #999999;
			line-height: 48rpx;
			margin: 10rpx auto 10rpx;
		}
	}
</style>